home *** CD-ROM | disk | FTP | other *** search
- ┌────────────────────────────────────────────────────────────────────────┐
- │Mod : STIMP05.MOD │
- │Version: WWIV 4.20e │
- │Author : Stimpy #1 @1002 NuclearArmsNET 442-1601 │
- │Description: Combines almost all sysop commands into one menu. │
- │Diffculty: ▓▓▓░░░░░░░ │
- │Disclaimer: Always backup your source. If you get an incredible urge to │
- │ sautee your cat, it's not my fault! │
- └────────────────────────────────────────────────────────────────────────┘
-
- = existing line
- + add line
- - deleted line
- * change line
-
- In BBS.C
-
- Add the following void right before void mainmenu()....
-
- void sysopmenu()
- {
- int done,i;
- char ch,*s, s1[81],s2[81];
-
- done=0;
- printmenu(5);
- do {
- tleft(1);
- npr("5[3Time left5] 1- 3%s\r\n",ctim(nsl()));
- outstr("7() 1The Devil's Doorknob Sysop Menu: Q,?7(> ");
- ch=onek("ABCDEFGHIJKLMNOPQRSTUVWXYZ?");
- switch(ch) {
- case 'A':
- sysoplog("@ Ran Boardedit");
- boardedit();
- break;
- case 'B':
- sysoplog("@ Ran Diredit");
- dlboardedit();
- break;
- case 'C':
- sysoplog("@ Ran Chainedit");
- chainedit();
- break;
- case 'D':
- sysoplog("@ Ran Gfileedit");
- gfileedit();
- break;
- case 'E':
- nl();
- prt(2,"PW: ");
- echo=0;
- input(s,20);
- echo=1;
- if (strcmp(s,("??????"))==0) { /*Insert any word you like where the
- ? marks are for a //DOS pw */
- sysoplog("@ Molested DOS");
- shrink_out(getenv("COMSPEC"),1,1,1,0);
- topscreen();
- }
- break;
- case 'F':
- reset_files();
- break;
- case 'G':
- dtr(0);
- sysoplog("@ Reset the computer");
- logoff();
- sl1(1,"");
- if (ok_modem_stuff)
- closeport();
- setvect(INT_SAVE_21,(void interrupt (*) ()) MK_FP(0xffff,0x0000));
- geninterrupt(INT_SAVE_21);
- break;
- case 'H':
- read_new_stuff();
- break;
- case 'I':
- nl();
- prt(1,"What is the filename? ");
- input(s1,50);
- if (s1[0]) {
- if ((okansi()) && (thisuser.defed))
- external_edit(s1,"",thisuser.defed-1,500);
- else
- tedit(s1);
- }
- break;
- case 'J':
- nl();
- prt(1,"What is the filename? ");
- input(s1,50);
- if (s1[0]) {
- nl();
- prt(5,"5Allow editing? ");
- if (yn()) {
- nl();
- load_workspace(s1,0);
- } else {
- nl();
- load_workspace(s1,1);
- }
- }
- break;
- case 'K':
- chuser();
- break;
- case 'L':
- nl();
- npr("5Stack size3: 5%d\r\n",_stklen);
- npr("5Heap free 3: 5%dk\r\n", (int) (farcoreleft()/1024));
- nl();
- break;
- case 'M':
- sysoplog("@ Read all mail");
- mailr();
- break;
- case 'N':
- nl();
- pl(((*(char far *)0x00000417L ^= 0x10) & 0x10) ?
- "3Sysop is now available" :
- "3Sysop is now unavailable");
- sysoplog("@ Changed sysop avail status");
- topscreen();
- break;
- case 'O':
- prstatus();
- break;
- case 'P':
- sysoplog("@ Ran Ivotes");
- ivotes();
- break;
- case 'Q':
- done=1;
- break;
- case 'R':
- sl1(3,s1);
- printfile(s1);
- break;
- case 'S':
- sysoplog("@ Ran Tedit");
- text_edit();
- break;
- case 'T':
- printfile(status.log1);
- break;
- case 'U':
- sysoplog("@ Ran Uedit");
- uedit(usernum,0);
- break;
- case 'V':
- zlog();
- break;
- case 'W':
- voteprint();
- break;
- case 'Z':
- helpl=14;
- if (!cs())
- return;
- nl();
- nl();
- pl("3Which user?");
- outstr(":");
- mpl(30);
- input(s1,30);
- i=finduser1(s1);
- if (i>0) {
- sysoplog("@ Validated user");
- valuser(i);
- } else
- pl("3Sorry there is nobody here by that name!");
- break;
- case '?':
- printmenu(5);
- break;
- }
- } while ((!done) && (!hangup));
- }
-
- In void mainmenu()
-
- Add the following case right after case 'G':
-
- case 'H':
- if ((actsl==255) && (checkpw()))
- sysopmenu();
- else
- pl("1You do not have access to that command");
- break;
-
- In void dlmainmenu() add the same case 'H' listed above right after
- case 'F':
-
- In void mainmenu()
- block delete all the //commands except for:
-
- /****************************************/
- if (cs()) {
- if (strcmp(s,"PENDING")==0) {
- print_pending_list();
- }
- if (strcmp(s,"NLOG")==0) {
- printfile("NET.LOG");
- }
- }
- /*************************************************/
- if ((strcmp(s,"UPLOAD")==0) && (actsl>10))
- upload_post();
- if (strcmp(s,"QSCAN")==0) {
- nl();
- prt(5,"5Do you really want to clear your Q-Scan pointers? ");
- if (yn()) {
- for (i=0; i<33; i++)
-
- The only ones you need to delete from dlmainmenu are:
-
- if ((strcmp(s,"DIREDIT")==0) && (so())) {
- sysoplog("@ Ran Diredit");
- dlboardedit();
- }
- if ((strcmp(s,"DOS")==0) && (so())) {
- if (checkpw()) {
- sysoplog("@ Shelled to DOS");
- shrink_out(getenv("COMSPEC"),1,1,1,0);
- topscreen();
- }
- }
-
- Then you may want to (you don't have to) go into the boardedit, chainedit,
- diredit, etc... files and delete any "(checkpw())" you might find in the
- if statements.
-
- You will also need to make a new MENU5.ANS/MENU5.MSG
-
- Now save and re-compile.